package com.example.myapplication;

import androidx.appcompat.app.AppCompatActivity;

import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Button button4=(Button) findViewById(R.id.button4);
        //给btn1绑定监听事件
        Button button5=(Button) findViewById(R.id.button5);
        Button button2=(Button) findViewById(R.id.button2);
        Button button3=(Button) findViewById(R.id.button3);
        Button button9=(Button) findViewById(R.id.button9);
        button4.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // 给bnt1添加点击响应事件
                Intent intent=new Intent(MainActivity.this,Main4Activity.class);
                //启动
                startActivity(intent);
            }
        });

        button5.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // 给bnt1添加点击响应事件
                Intent intent=new Intent(MainActivity.this,Main6Activity.class);
                //启动
                startActivity(intent);
            }
        });

        button2.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // 给bnt1添加点击响应事件
                Intent intent=new Intent(MainActivity.this,Main2Activity.class);
                //启动
                startActivity(intent);
            }
        });

        button3.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // 给bnt1添加点击响应事件
                Intent intent=new Intent(MainActivity.this,Main3Activity.class);
                //启动
                startActivity(intent);
            }
        });

        button9.setOnClickListener(new View.OnClickListener() {

            @Override
            public void onClick(View v) {
                // 给bnt1添加点击响应事件
                Intent intent=new Intent(MainActivity.this,Main5Activity.class);
                //启动
                startActivity(intent);
            }
        });
    }
}
